﻿@page
@model IndexModel
@{
    ViewData["Title"] = "用户概述";
    ViewData["ActivePage"] = ManageNavPages.Index;
}

<h4>@ViewData["Title"]</h4>
<partial name="_StatusMessage" model="Model.StatusMessage" />
<div class="row">
    <div class="col-md-6">
        <form id="profile-form" method="post">
            <div asp-validation-summary="All" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="UserId"></label>
                <input asp-for="UserId" class="form-control" disabled />
            </div>
            <div class="form-group">
                <label asp-for="Input.PhoneNumber"></label>
                <input asp-for="Input.PhoneNumber" class="form-control" />
                <span asp-validation-for="Input.PhoneNumber" class="text-danger"></span>
            </div>
            <button id="update-profile-button" type="submit" class="btn btn-primary">修改手机号码</button>
        </form>
    </div>
</div>

<hr />
<h4>用户角色：</h4>
<table class="table">
    <thead>
        <tr class="text-primary">
            <td>角色</td>
        </tr>
    </thead>
    <tbody>
        @foreach (var role in Model.UserRoles)
        {
            <tr>
                <td>@role.RoleId</td>
            </tr>
        }
    </tbody>
</table>

<hr />
<h4>角色声明：</h4>
<table class="table">
    <thead>
        <tr class="text-primary">
            <td>角色</td>
            <td>声明类型</td>
            <td>声明值</td>
        </tr>
    </thead>
    <tbody>
        @foreach (var roleclaim in Model.RoleClaims)
        {
        <tr>
            <td>@roleclaim.RoleId</td>
            <td>@roleclaim.ClaimType</td>
            <td>@roleclaim.ClaimValue</td>
        </tr>
        }
    </tbody>
</table>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}